The present invention relates to a switch control apparatus used in switch control of a client/server system operating on a plurality of nodes which are mutually connected via a network, a switch control method, and a computer-readable recording medium in which is recorded a switch control program.
Generally, a client/server system comprises at least two servers (main server and alternative server) having a series complex constitution, and a plurality of clients which are connected to the servers via a network. In such a client/server system, when a communications irregularity has been detected, the server providing the communications services to the clients is uniformly switched from the main server to the alternative server.
However, depending on the cause of the irregularity, the above switch control sometimes has the opposite effect of reducing the number of clients capable of receiving the communications services from the server. Consequently, there is a demand for an apparatus and a method to effectively solve this problem.
FIG. 7 is a block diagram showing the constitution of a conventional client/server system. In FIG. 7, nodes 10, 20 and 30 are mutually connected via a communications path for data 40 (communications path for control 50). A main server 11 and a client 12 operate in the node 10. An alternative server 21 and a client 22 operate in the node 20. A client 32 operates in the node 30.
In the node 10, the main server 11 supplies predetermined communications services to the clients 12, 22 and 32. The main server 11 functions as a present system server of the client/server system. The client 12 connects to the main server 11 and receives communications services therefrom during regular operation. When an irregularity occurs, the client 12 is able to switch from the main server 11 so as to receive communications services from the alternative server 21.
A communications section 13 is inserted between the main server 11 and the client 12 and the communications path for data 40, and controls communications between the main server 11 and the client 12 and the external nodes 20 and 30 in compliance with a predetermined communications protocol. A switch control section 14 controls the switching from the main server 11 to the alternative server 21. A communications section 15 is inserted between the switch control section 14 and the communications path for control 50, and controls communications between the switch control section 14 and the external nodes 20 and 30 in compliance with a predetermined communications protocol.
In the node 20, the alternative server 21 realizes the same functions as the main server 11, and provides the communications services instead of the main server 11 in the event of an irregularity. That is, the alternative server 21 functions as a standby server for the present server (the main server 11). Thus the conventional client/server system uses an in-series complex constitution comprising the main server 11 and the alternative server 21.
The client 22 receives communications services from the main server 11 during regular operation. When there is an irregularity, the client 22 is able to switch from the main server 11 so as to receive communications services from the alternative server 21. A communications section 23 is inserted between the alternative server 21 and the client 22 and the communications path for data 40, and controls communications between the alternative server 21 and the client 22 and the external nodes 10 and 30 in compliance with a predetermined communications protocol.
A switch control section 24 controls the switching from the main server 11 to the alternative server 21. A communications section 25 is inserted between the switch control section 24 and the communications path for control 50, and controls communications between the switch control section 24 and the external nodes 10 and 30 in compliance with a predetermined communications protocol.
In the node 30, the client 32 receives communications services from the main server 11 during regular operation. When there is an irregularity, the client 32 is able to switch from the main server 11 so as to receive communications services from the alternative server 21. A communications section 33 is inserted between the client 32 and the communications path for data 40, and controls communications between the client 32 and the external nodes 10 and 20 in compliance with a predetermined communications protocol.
A switch control section 34 controls the switching from the main server 11 to the alternative server 21. A communications section 35 is inserted between the switch control section 34 and the communications path for control 50, and controls communications between the switch control section 34 and the external nodes 10 and 20 in compliance with a predetermined communications protocol.
In the constitution described above, the main server 11 provides communications services in accordance with requests from the client 12 in the node 10, the client 22 in the node 20 and the client 32 in the node 30. The main server 11 provides the communications services to the client 12 in the same node 10. Furthermore, the main server 11 provides the communications services to the client 22 in the node 20 via the communications section 13, the communications path for data 40 and the communications section 23. Moreover, the main server 11 provides the communications services to the client 32 in the node 30 via the communications section 13, the communications path for data 40 and the communications section 33.
In addition to providing the communications services described above, the main server 11 checks the communications statuses (regular or irregular) of the clients 12, 22 and 32 at fixed intervals. Specifically, the clients 12, 22 and 32 each transmit a fixed-cycle communications packet to the main server 11 in a fixed cycle (e.g. every five seconds). This fixed-cycle communications packet comprises an address of the transmission destination main server 11, an address of the transmission source (the address of the clients 12, 22 and 32) and dummy data.
The main server 11 receives the fixed-cycle communications packets and deems a check result of the communications status of each client to be regular. In the case where no fixed-cycle communications packet is received from the client even when a predetermined period (e.g. thirty seconds) has elapsed from the time when the previous fixed-cycle communications packet was received, the main server 11 deems the check result of communications status of that client to be irregular.
When the communications section 23 in the node 20 breaks down, the main server 11 does not receive a fixed-cycle communications packet from the client 22. Therefore, the main server 11 deems the check result of the communications status of the client 22 to be irregular. In this case, the two clients 12 and 32 can receive the communications services from the main server 11, but the client 22 cannot.
The main server 11 notifies the switch control section 14 that the irregularity has been detected. The switch control section 14 switches access destination of the client 12 in the node 10 from the main server 11 to the alternative server 21. Furthermore, the switch control section 14 outputs a switch signal via the communications section 15, the communications path for control 50 and the communications section 25 to the switch control section 24 in the node 20, and outputs a switch signal via the communications section 15, the communications path for control 50 and the communications section 35 to the switch control section 34. As a consequence, the switch control sections 24 and 34 switch the access destinations of the clients 22 and 32 from the main server 11 to the alternative server 21.
After the switch, the alternative server 21 performs the function of providing the communications services to the clients 12, 22 and 32 instead of the main server 11. However, since there is an irregularity in the communications section 23 in the node 20, the client 12 in the node 10 and the client 32 in the node 30 cannot access the alternative server 21. On the other hand, the client 22 is able to access the alternative server 21 since the client 22 is in the same node there as (node 20). Therefore, after the switch, only the client 22 can receive the communications services from the alternative server 21.
As mentioned above, in the conventional client/server system, when an irregularity is detected in the communications statuses of the clients, the server providing the communications services to the clients is uniformly switched from the main server 11 to the alternative server 21.
However, when the communications section 23 has broken down as described above, although two clients (the clients 12 and 32) were able to receive the communications services prior to switching the server, only one client (the client 22) is able to receive the communications services after the switch. Consequently, the number of clients which can receive the communications services is reduced. It follows that it would be better not to switch the server in this case, since to do so would have the opposite effect of that intended.
It is an object of this invention to provide a switch control apparatus capable of preventing a reduction in the number of clients which can receive communications services due to switching the server, a switch control method, and a computer-readable recording medium in which is stored a switch control program.
In order to achieve the above objects, a first aspect of this invention provides a switch control apparatus for controlling a switch from a present server (corresponding to a main server 110 in the embodiment explained later), which provides communications services to a plurality of clients (corresponding to clients 120, 220 and 320 in an embodiment explained later) via a network (corresponding to a communications path for data 400 in the embodiment explained later), to a standby server (corresponding to an alternative server 210 in the embodiment explained later) which has the same functions as the present server. The switch control apparatus comprises a communications status checking unit (corresponding to a main server controller 111 in the embodiment explained later) which checks the communications status of each of said plurality of clients in a fixed cycle; a client number calculating unit (corresponding to the main server controller 111 in the embodiment explained later) which calculates the estimated number of clients which will be able to receive communications services from said standby server after the server is switched from said present server to said standby server based on all said check results in the case when a check result corresponding to at least one of the clients is irregular; and a control unit (corresponding to a switch control section 140 in the embodiment explained later) which determines whether switching is appropriate based on a comparison between a result calculated by said client number calculating unit and a number of clients which are receiving the communications services from said present server prior to switching, and controls switching from said present server to said standby server accordingly.
According to this invention, the communications status checking unit checks the communications status of each of the plurality of clients in a fixed cycle. When a communications status of at least one of the clients becomes irregular due to break down or the like, the client number calculating unit calculates the estimated number of clients which will be able to receive communications services from said standby server after the server is switched from said present server to said standby server based on all the check results.
Consequently, the control unit determines the appropriateness of the switching (whether or not to switch the server) by comparing the result (number of clients) calculated by said client number calculating unit with the number of clients which are receiving the communications services from said present server prior to switching (at present). When the control unit determines to switch (e.g. when the number of clients after switching will exceed the number of clients prior to switching), the server is switched from the present server to the standby server, whereby the standby server provides communications services to the plurality of clients.
On the other hand, when the control unit determines not to switch (e.g. when the number of clients after switching is less than the number of clients prior to switching), the control unit does not switch the server from the present server to the standby server, whereby the present server continues to provide communications services to the plurality of clients.
Thus, according to this invention, when the communications status of at least one of the clients has become irregular, the appropriateness of switching is determined based on a comparison between the result calculated by the client number counting unit and the number of clients which are receiving communications services from the present server prior to switching. Therefore, there is no unnecessary switching and the number of clients which can receive the communications services is not reduced by switching.
Furthermore, a second aspect of this invention comprises the switch control apparatus of the first aspect, wherein the control unit executes switching when said result calculated by said client number calculating unit has exceeded said number of clients which are receiving the communications services from said present server prior to switching.
According to this invention, the server is switched only when the communications status of at least one of the plurality of clients has become irregular, and the result calculated by said client number calculating unit has exceeded said number of clients which are receiving the communications services from said present server prior to switching. Therefore, there is no unnecessary switching and the number of clients which can receive the communications services is not reduced by switching.
Furthermore, a third aspect of this invention comprises the switch control apparatus of the first and second aspects, wherein the control unit does not perform switching in the case when said result calculated by said client number calculating unit is less than said number of clients which are receiving the communications services from said present server prior to switching.
According to this invention, the server is not switched when the communications status of at least one of the plurality of clients has become irregular and the result calculated by said client number calculating unit is less than said number of clients which are receiving the communications services from said present server prior to switching. Therefore, there is no unnecessary switching and the number of clients which can receive the communications services is not reduced by switching.
Furthermore, a fourth aspect of this invention comprises the switch control apparatus of any one of the first to third aspects, further comprising a service amount comparing unit (corresponding to the main server controller 111 in the embodiment explained later) which compares an amount of communications services which can be provided by said standby server with an amount of communications services which can be provided by said present server in the case when said result calculated by said client number calculating unit is the same as said number of clients which are receiving the communications services from said present server prior to switching; and the control unit determines whether switching is appropriate based on the result of the comparison performed by said service amount comparing unit, and controls switching accordingly.
According to this invention, even when said result calculated by said client number calculating unit is the same as said number of clients which are receiving the communications services from said present server prior to switching, the appropriateness of switching is determined based on a comparison between the amount of communications services which can be provided by said standby server and the amount of communications services which can be provided by said present server, and switching is controlled accordingly. Therefore, even when an irregularity has occurred, the quality of the communications service can be improved.
Furthermore, a fifth aspect of this invention comprises the switch control apparatus as described in the fourth aspect, wherein said control unit executes switching in the case where the amount of communications services which can be provided by said standby server exceeds the amount of communications services which can be provided by said present server, and does not execute switching in the case where the amount of communications services which can be provided by said standby server is equal to or less than the amount of communications services which can be provided by said present server.
According to this invention, the server is switched only when the amount of communications services which can be provided by said standby server exceeds the amount of communications services which can be provided by said present server. Therefore, even when an irregularity has occurred, a greater amount of communications services can be provided than prior to the irregularity.
Furthermore, a sixth aspect of this invention provides a switch control method for controlling a switch from a present server, which provides communications services to a plurality of clients via a network, to a standby server, which has the same functions as the present server, comprising the steps (corresponding to steps SA1 to SA2 in the embodiment explained later) of checking the communications status of each of said plurality of clients in a fixed cycle; calculating (corresponding to steps SA4 and SA6 in the embodiment explained later) the estimated number of clients which will be able to receive communications services from said standby server after the server is switched from said present server to said standby server based on all said check results in the case when a check result corresponding to at least one of the clients is irregular; and determining whether switching is appropriate based on a comparison between a result calculated in said step of calculating and a number of clients which are receiving the communications services from said present server prior to switching, and controlling switching from said present server to said standby server accordingly (corresponding to steps SA5, SA7, SA8 and SA10 in the embodiment explained later).
According to this invention, the communications statuses of the plurality of clients are checked in a fixed cycle in the step of checking the communications statuses. When a communications status of at least one of the clients becomes irregular due to break down or the like, the estimated number of clients which will be able to receive communications services from said standby server after the server is switched from said present server to said standby server is calculated based on all the check results in the step of calculating the client number.
Consequently, the appropriateness of the switching (whether or not to switch the server) is determined in the step of controlling by comparing the result (number of clients) calculated in the step of calculating the client number with the number of clients which are receiving the communications services from said present server prior to switching (at present). When switching is determined (e.g. when the number of clients after switching will exceed the number of clients prior to switching), in the step of controlling the server is switched from the present server to the standby server, whereby the standby server provides communications services to the plurality of clients.
On the other hand, when it is determined that the server is not to be switched (e.g. when the number of clients after switching is less than the number of clients prior to switching), in the step of controlling, the server is not switched from the present server to the standby server, and the present server continues to provide communications services to the plurality of clients.
Thus, according to this invention, when the communications status of at least one of the clients has become irregular, the appropriateness of switching is determined based on a comparison between the result calculated by the client number counting unit and the number of clients which are receiving communications services from the present server prior to switching. Therefore, there is no unnecessary switching and the number of clients which can receive the communications services is not reduced by switching.
Furthermore, a seventh aspect of this invention provides a computer-readable recording medium in which is stored a switch control program applied in a switch control apparatus for controlling a switch from a present server, which provides communications services to a plurality of clients via a network, to a standby server which has the same functions as the present server. The program allows a computer to execute the steps of checking the communications status of each of said plurality of clients in a fixed cycle (corresponding to steps SA1 to SA2 in the embodiment explained later); calculating the estimated number of clients which will be able to receive communications services from said standby server after the server is switched from said present server to said standby server based on all said check results in the case when a check result corresponding to at least one of the clients is irregular (corresponding to steps SA4 and SA6 in the embodiment explained later); and determining whether switching is appropriate based on a comparison between a result calculated in said step of calculating and a number of clients which are receiving the communications services from said present server prior to switching, and controlling switching from said present server to said standby server accordingly (corresponding to steps SA5, SA7, SA8 and SA10 in the embodiment explained later).
According to this invention, the communications statuses of the plurality of clients are checked in a fixed cycle in the step of checking the communications statuses. When a communications status of at least one of the clients becomes irregular due to break down or the like, the estimated number of clients which will be able to receive communications services from said standby server after the server is switched from said present server to said standby server is calculated based on all the check results in the step of calculating the client number.
Consequently, the appropriateness of the switching (whether or not to switch the server) is determined in the step of controlling by comparing the result (number of clients) calculated in the step of calculating the client number with the number of clients which are receiving the communications services from said present server prior to switching (at present). When switching is determined (e.g. when the number of clients after switching will exceed the number of clients prior to switching), in the step of controlling the server is switched from the present server to the standby server, whereby the standby server provides communications services to the plurality of clients.
On the other hand, when it is determined that the server is not to be switched (e.g. when the number of clients after switching is less than the number of clients prior to switching), in the step of controlling, the server is not switched from the present server to the standby server, and the present server continues to provide communications services to the plurality of clients.
Thus, according to this invention, when the communications status of at least one of the clients has become irregular, the appropriateness of switching is determined based on a comparison between the result calculated by the client number counting unit and the number of clients which are receiving communications services from the present server prior to switching. Therefore, there is no unnecessary switching and the number of clients which can receive the communications services is not reduced by switching.
Other objects and features of this invention will become understood from the following description with reference to the accompanying drawings.